package com.huawei.appmarket.service.settings.card;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.settings.view.activity.SettingsVideoAutoPlayActivity;
import com.huawei.fastengine.fastview.download.utils.PackageUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import o.cgz;
import o.der.d;
import o.der.f;
import o.dge;
import o.dgh;
import o.ContentManager;
import o.eqp;

public class SettingVideoPlayCard extends BaseSettingCard implements OnClickListener {
    private TextView ˊ;
    private String ˋ = UserSession.getInstance().getUserId();
    private TextView ˎ;
    private String ˏ = eqp.ॱ();
    private Context ॱ;

    public SettingVideoPlayCard(Context context) {
        super(context);
        this.ॱ = context;
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        this.ˎ = (TextView) view.findViewById(d.ʽʼ);
        this.ˊ = (TextView) view.findViewById(d.ʽʻ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        this.ˎ.setText(f.ˏـ);
        if (PackageUtils.HWGAMEBOX_PACKAGE_NAME.equals(ContentManager.getInstant().getContext().getPackageName())) {
            this.ˊ.setText(f.ˎꜟ);
        } else {
            this.ˊ.setText(f.ˎˌ);
        }
        this.ˊˋ.setOnClickListener(this);
    }

    public void onClick(View view) {
        dgh.onEvent(new dge.d(this.ᐝ, f.ʻˋ).ˏ("04" + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + this.ˋ + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + this.ˏ).ˋ());
        Intent intent = new Intent();
        intent.setClass(this.ॱ, SettingsVideoAutoPlayActivity.class);
        this.ॱ.startActivity(intent);
    }
}
